package com.cddx.logistics.mapper;

import com.cddx.logistics.domain.dto.TransferPageDTO;
import com.cddx.logistics.domain.pojo.TransferRecord;
import com.cddx.logistics.domain.vo.TransferQueryVO;
import com.cddx.logistics.domain.vo.WarehouseVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface TransferMapper {

    // 分页查询 + 动态条件查询
    List<TransferQueryVO> transferList(@Param("dto") TransferPageDTO transferPageDTO);

    // 批量删除
    boolean deleteTransfer(@Param("ids") List<Integer> ids);

    // 单条删除
    boolean deleteById(@Param("id") Integer id);

    // 插入记录
    boolean insert(@Param("transferRecord") TransferRecord transferRecord);

    // 更新记录
    boolean update(TransferRecord transferRecord);

    // 根据ID查询
    TransferRecord getById(@Param("id") Integer id);

    // 获取有转移记录的仓库
    List<WarehouseVO> getTransferWarehouses();

}
